<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    let str = 'mortal121314南风1234哈哈哈哈'
    // 正向断言
    const reg = /\d+(?=哈)/;
    const result = reg.exec(str);
    console.log(result);

    // 反向断言
    const reg2 = /(?<=风)\d+/;
    const result2 = reg2.exec(str);
    console.log(result2);



</script>

</html>